package com.trust.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.trust.agri.response.ResponseResult;
import com.trust.entity.Param.BreedListParam;
import com.trust.entity.VO.BreedListVO;
import com.trust.service.BreedService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Slf4j
@RequestMapping("/api/breed")
@Api(value = "基础设置 - 物料管理 种源", tags = "基础设置 - 物料管理 种源")
public class BreedController {


    @Resource
    private BreedService service;


    @PostMapping("/list")
    @ApiOperation("种源列表")
    public ResponseResult<Page<BreedListVO>> list(@RequestBody BreedListParam param){
        Page<BreedListVO> page = service.list(param);
        return ResponseResult.ok(page);
    }
}
